package com.hotel.service;


import com.hotel.bean.Room;
import com.hotel.dao.RoomDao;

import java.util.List;

public class RoomService {
    //创建Dao对象
    private RoomDao rd = new RoomDao();
    //添加
    public int add(Room room){
        return rd.add(room);
    }
    //查询所有
    public List<Room> selectAll(){
        return rd.selectAll();
    }
    //查询单个
    public Room selectById(int rid){
        return rd.selectById(rid);
    }
    //根据id删除
    public int deleteById(int rid){
        return rd.deleteById(rid);
    }
    //修改
    public int updateRoom(Room room){
        return rd.updateRoom(room);
    }
}
